package com.jkt.rms.business.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the resource_role_history table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="resource_role_history"
 */

public abstract class BaseResourceRoleHistory  implements Serializable {

	public static String REF = "ResourceRoleHistory";
	public static String PROP_RESOURCE_ROLE_ID = "resource_role_history_id";
	public static String PROP_ROLE_CODE = "roleCode";
	public static String PROP_ROLE_NAME = "roleName";
	public static String PROP_ROLE_DESC = "roleDesc";
	public static String PROP_UPDATED_BY = "updatedBy";
	public static String PROP_UPDATED_DATE = "updatedDate";
	public static String PROP_STATUS = "status";


	// constructors
	public BaseResourceRoleHistory () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseResourceRoleHistory (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseResourceRoleHistory (
		java.lang.Long id,
		java.lang.Long resource_role_history_id,
		java.lang.String roleCode,
		java.lang.String roleName,
		java.lang.String updatedBy,
		java.util.Date updatedDate,
		char status) {

		this.setId(id);
		this.setResource_role_history_id(resource_role_history_id);
		this.setRoleCode(roleCode);
		this.setRoleName(roleName);
		this.setUpdatedBy(updatedBy);
		this.setUpdatedDate(updatedDate);
		this.setStatus(status);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.lang.Long resource_role_history_id;
	private java.lang.String roleCode;
	private java.lang.String roleName;
	private java.lang.String roleDesc;
	private java.lang.String updatedBy;
	private java.util.Date updatedDate;
	private char status;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="resource_role_history_id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: resource_role_id
	 */
	public java.lang.Long getResource_role_history_id () {
		return resource_role_history_id;
	}

	/**
	 * Set the value related to the column: resource_role_id
	 * @param resource_role_id the resource_role_id value
	 */
	public void setResource_role_history_id (java.lang.Long resource_role_history_id) {
		this.resource_role_history_id = resource_role_history_id;
	}



	/**
	 * Return the value associated with the column: role_code
	 */
	public java.lang.String getRoleCode () {
		return roleCode;
	}

	/**
	 * Set the value related to the column: role_code
	 * @param roleCode the role_code value
	 */
	public void setRoleCode (java.lang.String roleCode) {
		this.roleCode = roleCode;
	}



	/**
	 * Return the value associated with the column: role_name
	 */
	public java.lang.String getRoleName () {
		return roleName;
	}

	/**
	 * Set the value related to the column: role_name
	 * @param roleName the role_name value
	 */
	public void setRoleName (java.lang.String roleName) {
		this.roleName = roleName;
	}



	/**
	 * Return the value associated with the column: role_description
	 */
	public java.lang.String getRoleDesc () {
		return roleDesc;
	}

	/**
	 * Set the value related to the column: role_description
	 * @param roleDesc the role_description value
	 */
	public void setRoleDesc (java.lang.String roleDesc) {
		this.roleDesc = roleDesc;
	}



	/**
	 * Return the value associated with the column: updated_by
	 */
	public java.lang.String getUpdatedBy () {
		return updatedBy;
	}

	/**
	 * Set the value related to the column: updated_by
	 * @param updatedBy the updated_by value
	 */
	public void setUpdatedBy (java.lang.String updatedBy) {
		this.updatedBy = updatedBy;
	}



	/**
	 * Return the value associated with the column: updated_date
	 */
	public java.util.Date getUpdatedDate () {
		return updatedDate;
	}

	/**
	 * Set the value related to the column: updated_date
	 * @param updatedDate the updated_date value
	 */
	public void setUpdatedDate (java.util.Date updatedDate) {
		this.updatedDate = updatedDate;
	}



	/**
	 * Return the value associated with the column: status
	 */
	public char getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (char status) {
		this.status = status;
	}





	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jkt.rms.business.ResourceRoleHistory)) return false;
		else {
			com.jkt.rms.business.ResourceRoleHistory resourceRoleHistory = (com.jkt.rms.business.ResourceRoleHistory) obj;
			if (null == this.getId() || null == resourceRoleHistory.getId()) return false;
			else return (this.getId().equals(resourceRoleHistory.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}